/*
* Copyright (c) 2008-2011, Thomas Handorf
* 
* This file is part of libScopes.
* libScopes is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* 
* libScopes is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU Lesser General Public License
* along with libScopes.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "array.h"

std::string array_print( array<double> & ar ) {
   size_type len=ar.size();
   size_type i;
   std::string str;
   char charstr[50];
   str.append("[");
   for (i=0;i<len;i++){
      sprintf(charstr,"%g ",ar[i]);
      str.append(charstr);
   }
   if (len) str.erase(str.length()-1,1);
   str.append("]");
   return str;
}
std::string array_print( array<float> & ar ) {
   size_type len=ar.size();
   size_type i;
   std::string str;
   char charstr[50];
   str.append("[");
   for (i=0;i<len;i++){
      sprintf(charstr,"%g ",ar[i]);
      str.append(charstr);
   }
   if (len) str.erase(str.length()-1,1);
   str.append("]");
   return str;
}
template <> bool TisReal<double>(){
   return true;
}
template <> bool TisReal<float>(){
   return true;
}
